/*
 * copyright (c) 2009 Alexandr [Sn@ble] Surnin
 *
 * This file is part of CVP.
 *
 * CVP is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * CVP is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You can read the full version of GNU LGPL in
 * http://www.gnu.org/copyleft/lesser.html
 */


#ifndef FILEINFO_H
#define FILEINFO_H

#include <QWidget>
#include <QString>
#include <QLabel>
#include <QGroupBox>
#include <QGridLayout>
#include <QVBoxLayout>


/** This class providing inforamation about loaded movie file
  * \author Alexandr [Sn@ble] Surnin
  */
class FileInfo : public QWidget {

public:
    FileInfo(QWidget *parent = 0);

public slots:
    /** Setting file name
      * \param _fileName File name
      */
    void setFileName(QString _fileName);


    /** Setting file size
      * \param _fileSize File size string (example: "1023Mb")
      */
    void setFileSize(QString _fileSize);


    /** Setting movie lenght
      * \param _movieLenght Movie lenght (time).
      * for example: "01:23:44:05", e.g. HH:MM:SS:FF
      */
    void setMovieLenght(QString _movieLenght);


    /** Setting codec name
      * \param _videoCodecName Codec name. For example: "XVid"
      */
    void setVideoCodecName(QString _videoCodecName);


    /** Setting video frames count
      * \param _videoFramesCount Count of video frames
      */
    void setVideoFramesCount(QString _videoFramesCount);


    /** Setting frames per second count
      * \param _videoFPS Frames per second (e.g. "25fps")
      */
    void setVideoFPS(QString _videoFPS);


    /** Setting video bitrate
      * \param _videoBitRate Bitrate of the video stream
      * for example: "avg 1382kbps(VBR)"
      */
    void setVideoBitRate(QString _videoBitRate);


    /** Setting audio codec name
      * \param _audioCodecName Name of audio codec
      * for example: "AAC"
      */
    void setAudioCodecname(QString _audioCodecName);


    /** Setting audio samples count
      * \param _audioSamplesCount Count of audio samples
      */
    void setAudioSamplesCount(QString _audioSampesCount);


    /** Setting audio bitrate
      * \param _audioBitRate Bitrate of audio stream
      */
    void setAudioBitRate(QString _audioBitRate);

private:

    QVBoxLayout *mainLayout;

    QGroupBox *commonInfo;
    QGridLayout *commonInfoLayout;
    QString fileName;
    QLabel *fileNameLabelLeft;
    QLabel *fileNameLabelRight;
    QString fileSize;
    QLabel *fileSizeLabelLeft;
    QLabel *fileSizeLabelRight;
    QString movieLenght;
    QLabel *movieLenghtLeft;
    QLabel *movieLenghtRight;

    QGroupBox *videoInfo;
    QGridLayout *videoInfoLayout;
    QString videoCodecName;
    QLabel *videoCodecLabelLeft;
    QLabel *videoCodecLabelRight;
    QString videoFramesCount;
    QLabel *videoFramesLabelLeft;
    QLabel *videoFramesLabelRight;
    QString videoFPS;
    QLabel *videoFPSLabelLeft;
    QLabel *videoFPSLabelRight;
    QString videoBitRate;
    QLabel *videoBitRateLabelLeft;
    QLabel *videoBitRateLabelRight;

    QGroupBox *audioInfo;
    QGridLayout *audioInfoLayout;
    QString audioCodecName;
    QLabel *audioCodecLabelLeft;
    QLabel *audioCodecLabelRight;
    QString audioSamplesCount;
    QLabel *audioSamplesLabelLeft;
    QLabel *audioSamplesLabelRight;
    QString audioBitRate;
    QLabel *audioBitRateLabelLeft;
    QLabel *audioBitRateLabelRight;

};

#endif // FILEINFO_H
